<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>ioctl VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="Video for Linux Two API Specification"
HREF="book1.htm"><LINK
REL="UP"
TITLE="Function Reference"
HREF="r7624.htm"><LINK
REL="PREVIOUS"
TITLE="ioctl VIDIOC_G_INPUT, VIDIOC_S_INPUT"
HREF="r11217.htm"><LINK
REL="NEXT"
TITLE="ioctl VIDIOC_G_MODULATOR, VIDIOC_S_MODULATOR"
HREF="r11430.htm"></HEAD
><BODY
CLASS="REFENTRY"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Video for Linux Two API Specification: Revision 0.24</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="r11217.htm"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="r11430.htm"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="VIDIOC-G-JPEGCOMP"
></A
>ioctl VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP</H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN11289"
></A
><H2
>Name</H2
>VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP&nbsp;--&nbsp;</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN11293"
></A
><H2
>Synopsis</H2
><DIV
CLASS="FUNCSYNOPSIS"
><P
></P
><A
NAME="AEN11294"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>int ioctl</CODE
>(int fd, int request, v4l2_jpegcompression *argp);</CODE
></P
><P
></P
></DIV
><DIV
CLASS="FUNCSYNOPSIS"
><P
></P
><A
NAME="AEN11304"
></A
><P
><CODE
><CODE
CLASS="FUNCDEF"
>int ioctl</CODE
>(int fd, int request, const v4l2_jpegcompression *argp);</CODE
></P
><P
></P
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN11314"
></A
><H2
>Arguments</H2
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
><CODE
CLASS="PARAMETER"
>fd</CODE
></DT
><DD
><P
>File descriptor returned by <A
HREF="r14090.htm"
><CODE
CLASS="FUNCTION"
>open()</CODE
></A
>.</P
></DD
><DT
><CODE
CLASS="PARAMETER"
>request</CODE
></DT
><DD
><P
>VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP</P
></DD
><DT
><CODE
CLASS="PARAMETER"
>argp</CODE
></DT
><DD
><P
></P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN11334"
></A
><H2
>Description</H2
><P
>[to do]</P
><P
>Ronald Bultje elaborates:</P
><P
>APP is some application-specific information. The
application can set it itself, and it'll be stored in the JPEG-encoded
fields (eg; interlacing information for in an AVI or so). COM is the
same, but it's comments, like 'encoded by me' or so.</P
><P
>jpeg_markers describes whether the huffman tables,
quantization tables and the restart interval information (all
JPEG-specific stuff) should be stored in the JPEG-encoded fields.
These define how the JPEG field is encoded. If you omit them,
applications assume you've used standard encoding. You usually do want
to add them.</P
><DIV
CLASS="TABLE"
><A
NAME="V4L2-JPEGCOMPRESSION"
></A
><P
><B
>Table 1. struct <CODE
CLASS="STRUCTNAME"
>v4l2_jpegcompression</CODE
></B
></P
><TABLE
BORDER="0"
FRAME="void"
WIDTH="100%"
CLASS="CALSTABLE"
><COL
WIDTH="25%"
TITLE="C1"><COL
WIDTH="25%"
TITLE="C2"><COL
WIDTH="50%"
TITLE="C3"><TBODY
VALIGN="TOP"
><TR
><TD
>int</TD
><TD
><CODE
CLASS="STRUCTFIELD"
>quality</CODE
></TD
><TD
>&nbsp;</TD
></TR
><TR
><TD
>int</TD
><TD
><CODE
CLASS="STRUCTFIELD"
>APPn</CODE
></TD
><TD
>&nbsp;</TD
></TR
><TR
><TD
>int</TD
><TD
><CODE
CLASS="STRUCTFIELD"
>APP_len</CODE
></TD
><TD
>&nbsp;</TD
></TR
><TR
><TD
>char</TD
><TD
><CODE
CLASS="STRUCTFIELD"
>APP_data</CODE
>[60]</TD
><TD
>&nbsp;</TD
></TR
><TR
><TD
>int</TD
><TD
><CODE
CLASS="STRUCTFIELD"
>COM_len</CODE
></TD
><TD
>&nbsp;</TD
></TR
><TR
><TD
>char</TD
><TD
><CODE
CLASS="STRUCTFIELD"
>COM_data</CODE
>[60]</TD
><TD
>&nbsp;</TD
></TR
><TR
><TD
>__u32</TD
><TD
><CODE
CLASS="STRUCTFIELD"
>jpeg_markers</CODE
></TD
><TD
>See <A
HREF="r11285.htm#JPEG-MARKERS"
>Table 2</A
>.</TD
></TR
></TBODY
></TABLE
></DIV
><DIV
CLASS="TABLE"
><A
NAME="JPEG-MARKERS"
></A
><P
><B
>Table 2. JPEG Markers Flags</B
></P
><TABLE
BORDER="0"
FRAME="void"
WIDTH="100%"
CLASS="CALSTABLE"
><COL
WIDTH="38%"
TITLE="C1"><COL
WIDTH="12%"
TITLE="C2"><COL
WIDTH="50%"
TITLE="C3"><TBODY
VALIGN="TOP"
><TR
><TD
><CODE
CLASS="CONSTANT"
>V4L2_JPEG_MARKER_DHT</CODE
></TD
><TD
>(1&lt;&lt;3)</TD
><TD
>Define Huffman Tables</TD
></TR
><TR
><TD
><CODE
CLASS="CONSTANT"
>V4L2_JPEG_MARKER_DQT</CODE
></TD
><TD
>(1&lt;&lt;4)</TD
><TD
>Define Quantization Tables</TD
></TR
><TR
><TD
><CODE
CLASS="CONSTANT"
>V4L2_JPEG_MARKER_DRI</CODE
></TD
><TD
>(1&lt;&lt;5)</TD
><TD
>Define Restart Interval</TD
></TR
><TR
><TD
><CODE
CLASS="CONSTANT"
>V4L2_JPEG_MARKER_COM</CODE
></TD
><TD
>(1&lt;&lt;6)</TD
><TD
>Comment segment</TD
></TR
><TR
><TD
><CODE
CLASS="CONSTANT"
>V4L2_JPEG_MARKER_APP</CODE
></TD
><TD
>(1&lt;&lt;7)</TD
><TD
>App segment, driver will always use APP0</TD
></TR
></TBODY
></TABLE
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN11418"
></A
><H2
>Return Value</H2
><P
>On success <SPAN
CLASS="RETURNVALUE"
>0</SPAN
> is returned, on error <SPAN
CLASS="RETURNVALUE"
>-1</SPAN
> and the <CODE
CLASS="VARNAME"
>errno</CODE
> variable is set appropriately:</P
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
><SPAN
CLASS="ERRORCODE"
>EINVAL</SPAN
></DT
><DD
><P
>This ioctl is not supported.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="r11217.htm"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="book1.htm"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="r11430.htm"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>ioctl VIDIOC_G_INPUT, VIDIOC_S_INPUT</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="r7624.htm"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>ioctl VIDIOC_G_MODULATOR, VIDIOC_S_MODULATOR</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>
